package com.Blog.test_2_1_spring_blog.model;

import com.Blog.test_2_1_spring_blog.utils.DateUtils;
import lombok.Data;

import java.util.Date;

@Data
public class BlogInfo {
    private Integer id;
    private String title;
    private String content;
    private Integer userId;
    private Integer deleteFlag;
    private Date createTime;
    private Date updateTime;

    private boolean isLoginUser; // 注意 boolean 生成的getter 方法 和 setter 方法 是有区别的

    public String getCreateTime() {
        return DateUtils.formatDate(createTime);
    }
}
